import axios from "axios";
import { notification } from "ant-design-vue";

function request(options) {
  try {
    const res = axios(options);
    return res;
  } catch (error) {
    const {
      response: { status, statusTest },
    } = error;
    notification.error({
      message: status + "：" + options.url,
      description: statusTest,
    });
    return Promise.reject(error);
  }
}
export default request;
